import request from '@/utiles/request.js';

export const submitApply = async (apply) =>{
  return await request.post('/api/apply/submit', apply)
}

export const inquireApply = async (startDate, endDate, pageSize, pageNum) => {
  return await request.get('/api/apply/inquiry',{
    params:{startDate,endDate,pageSize,pageNum}
  })
}


export const getStatusByApplyId = async (id) => {
  return await request.get(`/api/apply/status/${id}`)
}


export const getApplyById = async (id) => {
  return await request.get(`/api/apply/edit/${id}`)
}

export const updateApply = async (apply) => {
  return await request.put('/api/apply/update',apply)
}

export const getApprovalRecords = async (id) => {
  return await request.get(`/api/apply/approval-records/${id}`)
}

export const getApply  = async (id) => {
  return await request.get(`/api/apply/get/${id}`)
}
